import { ref, onMounted, computed } from 'vue'


export default function useCounter() {
  const counter = ref(0)

  const increment = () => counter.value += 1
  const decrement = () => counter.value -= 1


  const bigCounter = computed(()=>{
    return counter.value * 10 
  })

  onMounted(increment)

  return { counter,bigCounter, increment, decrement }
}